Nowadays, every aspect of people's lives almost always requires data. For example, online shopping, money transfer, and session are all related to data processing. Therefore, how to ensure data security also becomes a problem that the industry is always intensely concerned about.
In the existing technology, an identity authentication manner is usually used to improve data security. For example, comparison is performed between authentication information performed by a user, such as an account and a password, with prestored authentication information, and if the authentication information is the same as the prestored authentication information, authentication succeeds; otherwise, the authentication fails. To effectively prevent a hacker from making continuous login attempts (that is, authentication attempts) in a particular program brute force cracking manner for a particular registered user. In the existing technology, a “verification code” technology is further provided, that is, a problem that only a human being can answer is randomly generated, such as a digit string, letters, a text, an image, or a problem. A login user is required to enter information according to a requirement of the verification code, and only if the entered information is correct and authentication information is correct, it may be determined that authentication succeeds. In brief, the existence of the verification code is to distinguish whether the authentication information is entered by a person or input by a machine, so as to improve security.